﻿using System;
using FluentMigrator;

namespace EfficientlyLazy.PhotoFramer.Migrations
{
    [Migration(2011052712530000)]
    public class Create_Photos_Table : Migration
    {
        public override void Up()
        {
            Create.Table("Photos")
                .WithColumn("ID").AsGuid().PrimaryKey().NotNullable()
                .WithColumn("DateAdded").AsDateTime().NotNullable()
                .WithColumn("Filename").AsString(500).NotNullable()
                .WithColumn("IncludeOnFrame").AsBoolean().NotNullable()
                .WithColumn("RelativeLocation").AsString(2000).NotNullable()
                .WithColumn("Height").AsInt32().NotNullable()
                .WithColumn("Width").AsInt32().NotNullable()
                .WithColumn("HorizontalResolution").AsFloat().NotNullable()
                .WithColumn("VerticalResolution").AsFloat().NotNullable()
                .WithColumn("PixelFormat").AsString(100).NotNullable()
                .WithColumn("RawFormat").AsGuid().NotNullable()
                .WithColumn("Version").AsInt32().NotNullable();
        }

        public override void Down()
        {
            
        }
    }

    [Migration(2011060712530000)]
    public class Create_GlobalSettings_Table : Migration
    {
        public override void Up()
        {
            Create.Table("GlobalSettings")
                .WithColumn("ID").AsGuid().PrimaryKey().NotNullable()
                .WithColumn("Name").AsString(250).NotNullable()
                .WithColumn("Value").AsString(2000).NotNullable()
                .WithColumn("Version").AsInt32().NotNullable();
        }

        public override void Down()
        {

        }
    }
}
